package net.phoenix.repository.value;

import javax.jcr.PropertyType;
import javax.jcr.Value;

/**
 * 
 * Jigsaw server
 * 
 * @author <a href="shamphone@gmail.com">Li XiongFeng</a>
 * @date 2012-1-3
 * @version 1.0.0
 */
public class PathValue extends BasicValue {
	private String value;

	public PathValue(String value) {
		this.value = value;
	}


	/**
	 * getType
	 * 
	 * @return int
	 */
	public int getType() {
		return PropertyType.PATH;
	}

	public String getValue() {
		return this.value;
	}

	public String getString() {
		return this.value;
	}

	public boolean equals(Object o) {
		if (o == null)
			return false;
		return ((String) o).equals(this.value);
	}

	@Override
	public int compareTo(Value o) {
		return ((PathValue) o).value.compareTo(this.value);
	}

}
